Skip to content

chore: resolve remaining switch-exhaustiveness-check warnings#7113

Merged
isaacroldan merged 1 commit intomainfrom
03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings
Mar 27, 2026
Merged

chore: resolve remaining switch-exhaustiveness-check warnings#7113
isaacroldan merged 1 commit intomainfrom
03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings

Conversation

@isaacroldan
Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Copy Markdown
Contributor Author

isaacroldan commented Mar 26, 2026

@isaacroldan isaacroldan force-pushed the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch from 219a35f to 5617f2f Compare March 26, 2026 15:26
@isaacroldan isaacroldan force-pushed the 03-26-chore_fix_87_eslint_warnings_across_the_codebase branch 2 times, most recently from 351844e to d167d8f Compare March 26, 2026 18:07
@isaacroldan isaacroldan force-pushed the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch 2 times, most recently from b348343 to a45bace Compare March 27, 2026 09:18
@isaacroldan isaacroldan force-pushed the 03-26-chore_fix_87_eslint_warnings_across_the_codebase branch 2 times, most recently from 731c405 to 7d8f828 Compare March 27, 2026 09:26
@isaacroldan isaacroldan force-pushed the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch from a45bace to d9a2ee6 Compare March 27, 2026 09:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 82.28% 15094/18345
🟡 Branches 74.83% 7442/9945
🟢 Functions 81.29% 3794/4667
🟢 Lines 82.67% 14272/17264

Test suite run success

3993 tests passing in 1527 suites.

Report generated by 🧪jest coverage report action from 5d67093

@isaacroldan isaacroldan force-pushed the 03-26-chore_fix_87_eslint_warnings_across_the_codebase branch from 7d8f828 to b23df55 Compare March 27, 2026 10:23
@isaacroldan isaacroldan force-pushed the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch from d9a2ee6 to 62a7259 Compare March 27, 2026 10:23
@isaacroldan isaacroldan marked this pull request as ready for review March 27, 2026 10:24
@isaacroldan isaacroldan requested a review from a team as a code owner March 27, 2026 10:24
@github-actions
Copy link
Copy Markdown
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@isaacroldan isaacroldan force-pushed the 03-26-chore_fix_87_eslint_warnings_across_the_codebase branch from b23df55 to ccb06f4 Compare March 27, 2026 10:25
@isaacroldan isaacroldan force-pushed the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch from 62a7259 to 4535e02 Compare March 27, 2026 10:25
Fix all 20 remaining eslint warnings (switch-exhaustiveness-check):

- fqdn.ts: file-level suppress — all switches branch on 'local' vs default
  (production). Tests mock serviceEnvironment() returning undefined, so
  explicit enum cases break tests.
- scopes.ts: add explicit 'admin'|'storefront-renderer' cases that throw
- output.ts: add missing 'silent' case to logLevelValue
- tree-kill.ts: suppress — default handles all Unix-like platforms
- mkcert.ts: suppress — default throws for unsupported platforms
- Logs.tsx: replace default with explicit BackgroundExecutionReason.Unknown
- execute-bulk-operation.ts: replace default with explicit error status cases
- format-bulk-operation-status.ts: replace default with explicit status cases
- extension.ts: replace default with explicit undefined|liquid|config-only
- declarative-definitions.ts: replace defaults with explicit GraphQL enum cases
- extension-config-builder.ts: replace default with explicit undefined case,
  use ?? instead of || for context fallback chain

Combined with the parent PR, this brings the codebase from 107 warnings to 0.

Co-authored-by: Claude Code <claude-code@anthropic.com>
@isaacroldan isaacroldan force-pushed the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch from 4535e02 to 5d67093 Compare March 27, 2026 10:37
case BackgroundExecutionReason.CacheAboutToExpire:
return 'Cache is about to expire'
default:
case BackgroundExecutionReason.Unknown:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shoul'd we still have a default case here just in case? same in the others, why not a default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not having a default forces you to implement a caseif you add a new option to the Enum. The default would silently catch it.

Base automatically changed from 03-26-chore_fix_87_eslint_warnings_across_the_codebase to main March 27, 2026 12:45
@isaacroldan isaacroldan added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit 4c2d526 Mar 27, 2026
50 of 51 checks passed
@isaacroldan isaacroldan deleted the 03-26-chore_resolve_remaining_switch-exhaustiveness-check_warnings branch March 27, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants